#include "util.h"



string curtime(){
  SYSTEMTIME SystemTime;
  GetLocalTime(&SystemTime);

  stringstream ss;

  ss << SystemTime.wYear << "-";
  if (SystemTime.wMonth<10){
    ss << "0" << SystemTime.wMonth << "-";
  }
  if (SystemTime.wDay<10){
    ss << "0" ;
  }
  ss << SystemTime.wDay << " ";
  if (SystemTime.wHour<10){
    ss << "0" ;
  }
  ss << SystemTime.wHour << ":";
  if (SystemTime.wMinute<10){
    ss << "0" ;
  }
  ss << SystemTime.wMinute << ":";
  if (SystemTime.wSecond<10){
    ss << "0";
  }
  ss << SystemTime.wSecond << "." << SystemTime.wMilliseconds << endl;
  //cout << ss.str() << endl;
  return ss.str();
}